﻿// ***************************************************************************
// YAMM
// Copyright (C) 2008 Christian Schmiljun, Frank Weißenborn
// http://www.codeplex.com/YAMM 
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// ***************************************************************************

using System;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;

namespace YAMM.PlugIn
{
    /// <summary>
    /// Defines methods for IToolStripItem collections.
    /// </summary>
    public interface IToolStripItemCollection
    {
        #region Add
        #region AddButton
        /// <summary>
        /// Adds the button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <returns>The button.</returns>
        IToolStripButton AddButton(Guid identifier, string caption, EventHandler clickHandler);
        /// <summary>
        /// Adds the button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="shortcutKey">The shortcut key.</param>
        /// <returns>The button.</returns>
        IToolStripButton AddButton(Guid identifier, string caption, EventHandler clickHandler, Keys shortcutKey);
        /// <summary>
        /// Adds the button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="image">The image.</param>
        /// <returns>The button.</returns>
        IToolStripButton AddButton(Guid identifier, string caption, EventHandler clickHandler, Image image);
        /// <summary>
        /// Adds the button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="image">The image.</param>
        /// <param name="shortcutKey">The shortcut key.</param>
        /// <returns>The button.</returns>
        IToolStripButton AddButton(Guid identifier, string caption, EventHandler clickHandler, Image image, Keys shortcutKey);
        #endregion

        #region AddCheckableButton
        /// <summary>
        /// Adds the checkable button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="isChecked">if set to <c>true</c> is checked.</param>
        /// <returns>The checkable button.</returns>
        IToolStripCheckableButton AddCheckableButton(Guid identifier, string caption, EventHandler clickHandler, bool isChecked);
        /// <summary>
        /// Adds the checkable button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="isChecked">if set to <c>true</c> [is checked].</param>
        /// <param name="shortcutKey">The shortcut key.</param>
        /// <returns>The checkable button.</returns>
        IToolStripCheckableButton AddCheckableButton(Guid identifier, string caption, EventHandler clickHandler, bool isChecked, Keys shortcutKey);
        /// <summary>
        /// Adds the checkable button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="isChecked">if set to <c>true</c> [is checked].</param>
        /// <param name="image">The image.</param>
        /// <returns>The checkable button.</returns>
        IToolStripCheckableButton AddCheckableButton(Guid identifier, string caption, EventHandler clickHandler, bool isChecked, Image image);
        /// <summary>
        /// Adds the checkable button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="isChecked">if set to <c>true</c> [is checked].</param>
        /// <param name="shortcutKey">The shortcut key.</param>
        /// <param name="image">The image.</param>
        /// <returns>The checkable button.</returns>
        IToolStripCheckableButton AddCheckableButton(Guid identifier, string caption, EventHandler clickHandler, bool isChecked, Keys shortcutKey, Image image);
        #endregion

        #region AddSubMenuDropDownButton
        /// <summary>
        /// Adds the sub menu drop down button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <returns></returns>
        IToolStripDropDownButton AddSubMenuDropDownButton(Guid identifier, string caption, EventHandler clickHandler);
        /// <summary>
        /// Adds the sub menu drop down button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="image">The image.</param>
        /// <returns></returns>
        IToolStripDropDownButton AddSubMenuDropDownButton(Guid identifier, string caption, EventHandler clickHandler, Image image);
        #endregion

        #region AddSubMenuSplitButton
        /// <summary>
        /// Adds the sub menu split button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <returns></returns>
        IToolStripSplitButton AddSubMenuSplitButton(Guid identifier, string caption, EventHandler clickHandler);
        /// <summary>
        /// Adds the sub menu split button.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="image">The image.</param>
        /// <returns></returns>
        IToolStripSplitButton AddSubMenuSplitButton(Guid identifier, string caption, EventHandler clickHandler, Image image);
        #endregion

        #region AddSeparator
        /// <summary>
        /// Adds the separator.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <returns></returns>
        IToolStripSeparator AddSeparator(Guid identifier);
        #endregion

        #region AddTextBox
        /// <summary>
        /// Adds the text box.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <returns></returns>
        IToolStripTextBox AddTextBox(Guid identifier, EventHandler clickHandler);
        /// <summary>
        /// Adds the text box.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <param name="text">The text.</param>
        /// <returns></returns>
        IToolStripTextBox AddTextBox(Guid identifier, EventHandler clickHandler, string text);
        #endregion

        #region AddComboBox
        /// <summary>
        /// Adds the combo box.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="clickHandler">The click handler.</param>
        /// <returns></returns>
        IToolStripComboBox AddComboBox(Guid identifier, EventHandler clickHandler);
        #endregion

        #endregion

        /// <summary>
        /// Determines whether YAMM.PlugIn.IToolStripItemCollection contains a specific IToolStripItem.
        /// </summary>
        /// <param name="identifier">The identifier of the specific IToolStripItem.</param>
        /// <returns>
        /// 	<c>true</c> if YAMM.PlugIn.IToolStripItemCollection contains the specified item with this identifier.; otherwise, <c>false</c>.
        /// </returns>
        bool Contains(Guid identifier);

        /// <summary>
        /// Removes the specified item.
        /// </summary>
        /// <param name="identifier">The identifier of the item.</param>
        void Remove(Guid identifier);

        /// <summary>
        /// Gets the number of elements contained in the YAMM.PlugIn.IToolStripItemCollection.
        /// </summary>
        /// <value>The number of elements contained in the YAMM.PlugIn.IToolStripItemCollection.</value>
        int Count { get; }

        /// <summary>
        /// Gets the <see cref="YAMM.PlugIn.IToolStripItem"/> with the specified identifier.
        /// </summary>
        /// <value>The item with the specified identifier.</value>
        IToolStripItem this[Guid identifier] { get; }
    }
}
